<?php
/**
 * Google Friend Connect(GFC) Integration
 *
 * @package ElggGFC
 * @license http://www.gnu.org/licenses/old-licenses/gpl-2.0.html GNU Public License version 2
 * @author Arunoda Susiripala
 * @copyright Arunoda Susiripala 2009
 * @link http://elgggfc.googlecode.com
 */

$username=get_input("username");
$out;
if($username){
	$elgg_user=get_user_by_username($username);
	$elgg_user->gfcValidation="OK";
	
	$out=array("username"=>$username,"action"=>"OK");
}
else{
	$out=array("username"=>$username,"action"=>"FAILED");
}

echo json_encode($out);